/**
 * FileName: UserController
 * Author:   Administrator
 * Date:     2018/11/16 16:42
 * Description: 后台用户管理
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.fortune.rainshinesystem.controller;

import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.model.SysUsers;
import com.fortune.rainshinesystem.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 〈一句话功能简述〉<br> 
 * 〈后台用户管理〉
 *
 * @author Administrator
 * @create 2018/11/16
 * @since 1.0.0
 */
@RestController
@RequestMapping(value = "/user")
public class UserController {
    @Autowired
    private UserService service;

    /*添加用户*/
    @PostMapping("/add")
    public MsgModel<String> add(@RequestBody SysUsers user){
        System.out.println(user.getPassword());
        return service.addUser(user);
    }

    /*获取用户列表*/
    @PostMapping("/list")
    public MsgModel<?> list(@RequestBody SysUsers user){

        return service.list();
    }
}